package com.gxuwz.zhangjiahui.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxuwz.zhangjiahui.entity.Budget;
import com.gxuwz.zhangjiahui.entity.Enclosure;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
public interface IEnclosureService extends IService<Enclosure> {

    // 根据 id 查询对应信息
    Enclosure findEnclosureById(Enclosure enclosure);

    // 根据 项目 查询对应信息
    List<Enclosure> findEnclosureByProject(Enclosure enclosure);

    // 查询全部信息
    List<Enclosure> findEnclosureAll();

    //自定义sql 分页
    IPage<Enclosure> selectEnclosurePage(Page<Enclosure> page, @Param(Constants.WRAPPER) Wrapper<Enclosure> wrapper);

    // 添加信息
    void addEnclosure(Enclosure enclosure);

    // 修改信息
    void updateEnclosureById(Enclosure enclosure);

    // 删除信息
    void deleteEnclosureById(Enclosure enclosure);

}
